<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<link rel="icon" type="image/ico" href="images/favicon.ico"></link> 
	<link rel="shortcut icon" href="images/favicon.ico"></link>
	<link rel="stylesheet" type="text/css" href="styles.css">
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Enviados</title>
</head>
<body>
	<h1>Enviados</h1>
	<div id="boton_redactar">
		<a href="redactarEmail?to=null">Redactar</a>
	</div>
	<div id="boton_enviados">
		<a href="redirectAdmin?to=recibidos">Recibidos</a>
	</div>
	<div id="tabla_inbox">
		<table width="40%" cellpadding="5" bordercolor="#000066" 
		  			bgcolor="#FFFFFF" border="1" cellspacing="0">
		  			 <tr>
		  			 	<th></th>
	                    <th>Destinatario</th>
	                    <th>Asunto</th>
	                    <th>Fecha</th>
	                    <th></th>
			         </tr>
			         <c:forEach var="email" items="${emails}">
				         <tr>
				         			<td><form method="POST" action="detalleEmail?id=${email.id}">
					 						<input type="submit" value="Ver"/>
										</form>
									</td>
				                    <td><c:out value="${email.remitente}"/></td>
				                    <td><c:out value="${email.asunto}" /></td>
				                    <td><c:out value="${email.fecha}" /></td>
				                    <td><form method="POST" action="eliminarEmail?id=${email.id}">
					 						<input type="submit" value="Eliminar"/>
										</form>
									</td>
				         </tr>
			     	</c:forEach>
		</table>
	</div>
</body>
</html>